Getting start |
Activate your project in Delphi IDE and choose Projects/Generate LNG file from main menu (this menu command is installed with Balmsoft Polyglot library).
Press ok and wizard store all localizable properties and all resourcestrings from your forms to selected lng file.
Place translation manager on your main form or main data module. Place translator to all froms you wish to translate. All form translators must be linked to this manager.
If Manager doesn't appear in the popup menu add reference to main form ( or other place where you placed translation manager ) to uses section in this module. It is required to make this link in design time.
Specify LangsDir property (... button brings choose folder dialog ). Depends on LangsDir there will be different set of languages that can be choosen. List of languages are generated based on *.lng file names.
It is possible to specify this properties in runtime:
Example:
//set folder with language files to the same folder as exe file PolyglotManager.LangsDir := ExtractFileDir(ParamStr(0)); //set current language to French (read from french.lng file) PolyglotManager.CurrentLang := 'french';
Copy generated pattern.lng to files with your translations for example french.lng, english.lng, german.lng and so on. and make appropriate modifications. To know more about file format please see File format topic.
Look all labels are shown from chosen in manager language.
For more information refer Task based topics.